//
// Created by harrybao on 2019/4/9.
//

#ifndef CMAKE_OBJECT_POOL_MANAGER_H
#define CMAKE_OBJECT_POOL_MANAGER_H

#include <typeinfo>
#include <unordered_map>
#include "../../common/pool/abstract_pool.h"

class ObjectPoolManager
{
public:
    ObjectPoolManager();
    ~ObjectPoolManager();
public:
    bool Init();
    void UnInit();
    void Register(size_t hash_code, AbstractPool *pool);
    void Recycle(size_t hash_code, void* data);
private:
    std::unordered_map<size_t, AbstractPool*> pools_;
};

#endif //CMAKE_OBJECT_POOL_MANAGER_H
